<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gdsl: Permutation manipulation module</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">gdsl
   &#160;<span id="projectnumber">1.7</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__gdsl__perm.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#enumval-members">Enumerator</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Permutation manipulation module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct gdsl_perm *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL permutation type.  <a href="#gad6fc9c69f61c5703242070522910bea8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gab673258e31963cc4a3cca96a8ac527cc">gdsl_perm_write_func_t</a> )(<a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> E, FILE *OUTPUT_FILE, <a class="el" href="group__gdsl__types.html#ga55b31c129e50e1231ab5aba5eee3b0d8">gdsl_location_t</a> POSITION, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GDSL permutation write function type.  <a href="#gab673258e31963cc4a3cca96a8ac527cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct gdsl_perm_data *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad36e1c8819e3cb396faf5f3dfd3199af">gdsl_perm_data_t</a></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad96e38867e9ba3be2adc9c0e51f5f6c2">gdsl_perm_position_t</a> { <a class="el" href="group__gdsl__perm.html#ggad96e38867e9ba3be2adc9c0e51f5f6c2a9c24d378f1f58cd39771f5a266a0cd51">GDSL_PERM_POSITION_FIRST</a> =  1, 
<a class="el" href="group__gdsl__perm.html#ggad96e38867e9ba3be2adc9c0e51f5f6c2a730d4a9a6dcd24b454e03c1a3d832903">GDSL_PERM_POSITION_LAST</a> =  2
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This type is for gdsl_perm_write_func_t.  <a href="group__gdsl__perm.html#gad96e38867e9ba3be2adc9c0e51f5f6c2">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga5ac48f8e5aed0700bf6d74525ab4dc5f">gdsl_perm_alloc</a> (const char *NAME, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> N)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new permutation.  <a href="#ga5ac48f8e5aed0700bf6d74525ab4dc5f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga6b47f17955cf07b9152f140f12f95082">gdsl_perm_free</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a permutation.  <a href="#ga6b47f17955cf07b9152f140f12f95082"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gae3ba6e6c706cf1ddeeb7ca810762b0ea">gdsl_perm_copy</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy a permutation.  <a href="#gae3ba6e6c706cf1ddeeb7ca810762b0ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gab4feda5cbd58558d67c49244c33a4481">gdsl_perm_get_name</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of a permutation.  <a href="#gab4feda5cbd58558d67c49244c33a4481"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gac9b83edf2f8ec8ad479586219881cc93">gdsl_perm_get_size</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of a permutation.  <a href="#gac9b83edf2f8ec8ad479586219881cc93"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga6b88e7e20a9942a1da01c23d2ef8936c">gdsl_perm_get_element</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> INDIX)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the (INDIX+1)-th element from a permutation.  <a href="#ga6b88e7e20a9942a1da01c23d2ef8936c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gaa5e0d0afabe6d79d5ce04da174b8667b">gdsl_perm_get_elements_array</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the array elements of a permutation.  <a href="#gaa5e0d0afabe6d79d5ce04da174b8667b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga9e3960e0cbaba7b0a1821742651f26ce">gdsl_perm_linear_inversions_count</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count the inversions number into a linear permutation.  <a href="#ga9e3960e0cbaba7b0a1821742651f26ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga84ccaeabf3ffbc6143be37b3de6c53e3">gdsl_perm_linear_cycles_count</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count the cycles number into a linear permutation.  <a href="#ga84ccaeabf3ffbc6143be37b3de6c53e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga4f851d54782568685ae55b964ea94ef7">gdsl_perm_canonical_cycles_count</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count the cycles number into a canonical permutation.  <a href="#ga4f851d54782568685ae55b964ea94ef7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gaceca0436e5a36d5d18f660ac095b1c3e">gdsl_perm_set_name</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const char *NEW_NAME)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the name of a permutation.  <a href="#gaceca0436e5a36d5d18f660ac095b1c3e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga96c51be096313fb40d8ef6a216b5ee54">gdsl_perm_linear_next</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next permutation from a linear permutation.  <a href="#ga96c51be096313fb40d8ef6a216b5ee54"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gaab88f0c950081d8ffa112e54bb7435fc">gdsl_perm_linear_prev</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the previous permutation from a linear permutation.  <a href="#gaab88f0c950081d8ffa112e54bb7435fc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gab6a8108d042d230f0838e975d439656a">gdsl_perm_set_elements_array</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> *ARRAY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a permutation with an array of values.  <a href="#gab6a8108d042d230f0838e975d439656a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad38dd48e3815e438a53d119c39753ee0">gdsl_perm_multiply</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> RESULT, const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> ALPHA, const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> BETA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply two permutations.  <a href="#gad38dd48e3815e438a53d119c39753ee0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad015b546ff3bad397617661869a1fcfb">gdsl_perm_linear_to_canonical</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> Q, const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a linear permutation to its canonical form.  <a href="#gad015b546ff3bad397617661869a1fcfb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga648a4fc1929f159a58e3e768fa0396ae">gdsl_perm_canonical_to_linear</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> Q, const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a canonical permutation to its linear form.  <a href="#ga648a4fc1929f159a58e3e768fa0396ae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gaefadbcc1a7b7182da1f54f7d10db3d2b">gdsl_perm_inverse</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverse in place a permutation.  <a href="#gaefadbcc1a7b7182da1f54f7d10db3d2b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga1db013c30cc84b004344fd1269614845">gdsl_perm_reverse</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverse in place a permutation.  <a href="#ga1db013c30cc84b004344fd1269614845"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gae98151cfcded6cf6d4a66374db5c4714">gdsl_perm_randomize</a> (<a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Randomize a permutation.  <a href="#gae98151cfcded6cf6d4a66374db5c4714"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gaf03dc9a6539bf9dca426858db7f55b51">gdsl_perm_apply_on_array</a> (<a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> *V, const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a permutation on to a vector.  <a href="#gaf03dc9a6539bf9dca426858db7f55b51"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga45bf1ea87129954de111428ef3d59e2e">gdsl_perm_write</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the elements of a permutation to a file.  <a href="#ga45bf1ea87129954de111428ef3d59e2e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#ga8502f95088d9e9bdb8b3e25495404213">gdsl_perm_write_xml</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the elements of a permutation to a file into XML.  <a href="#ga8502f95088d9e9bdb8b3e25495404213"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gdsl__perm.html#gad09dc532469272837d7f052980519526">gdsl_perm_dump</a> (const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> P, const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a> WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dump the internal structure of a permutation to a file.  <a href="#gad09dc532469272837d7f052980519526"></a><br/></td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gad6fc9c69f61c5703242070522910bea8"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_t" ref="gad6fc9c69f61c5703242070522910bea8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct gdsl_perm* <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL permutation type. </p>
<p>This type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. </p>

<p>Definition at line <a class="el" href="gdsl__perm_8h_source.html#l00050">50</a> of file <a class="el" href="gdsl__perm_8h_source.html">gdsl_perm.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab673258e31963cc4a3cca96a8ac527cc"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_write_func_t" ref="gab673258e31963cc4a3cca96a8ac527cc" args=")(ulong E, FILE *OUTPUT_FILE, gdsl_location_t POSITION, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  <a class="el" href="group__gdsl__perm.html#gab673258e31963cc4a3cca96a8ac527cc">gdsl_perm_write_func_t</a>)(<a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> E, FILE *OUTPUT_FILE, <a class="el" href="group__gdsl__types.html#ga55b31c129e50e1231ab5aba5eee3b0d8">gdsl_location_t</a> POSITION, void *USER_DATA)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GDSL permutation write function type. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">E</td><td>The permutation element to write </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write E </td></tr>
    <tr><td class="paramname">POSITION</td><td>is an or-ed combination of gdsl_perm_position_t values to indicate where E is located into the gdsl_perm_t mapped. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="gdsl__perm_8h_source.html#l00074">74</a> of file <a class="el" href="gdsl__perm_8h_source.html">gdsl_perm.h</a>.</p>

</div>
</div>
<a class="anchor" id="gad36e1c8819e3cb396faf5f3dfd3199af"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_data_t" ref="gad36e1c8819e3cb396faf5f3dfd3199af" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct gdsl_perm_data* <a class="el" href="group__gdsl__perm.html#gad36e1c8819e3cb396faf5f3dfd3199af">gdsl_perm_data_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="gdsl__perm_8h_source.html#l00080">80</a> of file <a class="el" href="gdsl__perm_8h_source.html">gdsl_perm.h</a>.</p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gad96e38867e9ba3be2adc9c0e51f5f6c2"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_position_t" ref="gad96e38867e9ba3be2adc9c0e51f5f6c2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__gdsl__perm.html#gad96e38867e9ba3be2adc9c0e51f5f6c2">gdsl_perm_position_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This type is for gdsl_perm_write_func_t. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggad96e38867e9ba3be2adc9c0e51f5f6c2a9c24d378f1f58cd39771f5a266a0cd51"></a><!-- doxytag: member="GDSL_PERM_POSITION_FIRST" ref="ggad96e38867e9ba3be2adc9c0e51f5f6c2a9c24d378f1f58cd39771f5a266a0cd51" args="" -->GDSL_PERM_POSITION_FIRST</em>&nbsp;</td><td>
<p>When element is at first position </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggad96e38867e9ba3be2adc9c0e51f5f6c2a730d4a9a6dcd24b454e03c1a3d832903"></a><!-- doxytag: member="GDSL_PERM_POSITION_LAST" ref="ggad96e38867e9ba3be2adc9c0e51f5f6c2a730d4a9a6dcd24b454e03c1a3d832903" args="" -->GDSL_PERM_POSITION_LAST</em>&nbsp;</td><td>
<p>When element is at last position </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="gdsl__perm_8h_source.html#l00055">55</a> of file <a class="el" href="gdsl__perm_8h_source.html">gdsl_perm.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga5ac48f8e5aed0700bf6d74525ab4dc5f"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_alloc" ref="ga5ac48f8e5aed0700bf6d74525ab4dc5f" args="(const char *NAME, const ulong N)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#ga5ac48f8e5aed0700bf6d74525ab4dc5f">gdsl_perm_alloc</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NAME</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new permutation. </p>
<p>Allocate a new permutation data structure of size N wich name is set to a copy of NAME.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( N ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>N &gt; 0 </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">N</td><td>The number of elements of the permutation to create. </td></tr>
    <tr><td class="paramname">NAME</td><td>The name of the new permutation to create </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the newly allocated identity permutation in its linear form in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga6b47f17955cf07b9152f140f12f95082" title="Destroy a permutation.">gdsl_perm_free()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gae3ba6e6c706cf1ddeeb7ca810762b0ea" title="Copy a permutation.">gdsl_perm_copy()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga6b47f17955cf07b9152f140f12f95082"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_free" ref="ga6b47f17955cf07b9152f140f12f95082" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__perm.html#ga6b47f17955cf07b9152f140f12f95082">gdsl_perm_free</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy a permutation. </p>
<p>Deallocate the permutation P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to destroy </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga5ac48f8e5aed0700bf6d74525ab4dc5f" title="Create a new permutation.">gdsl_perm_alloc()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gae3ba6e6c706cf1ddeeb7ca810762b0ea" title="Copy a permutation.">gdsl_perm_copy()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gae3ba6e6c706cf1ddeeb7ca810762b0ea"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_copy" ref="gae3ba6e6c706cf1ddeeb7ca810762b0ea" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gae3ba6e6c706cf1ddeeb7ca810762b0ea">gdsl_perm_copy</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copy a permutation. </p>
<p>Create and return a copy of the permutation P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t. </dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>The returned permutation must be deallocated with gdsl_perm_free. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to copy. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a copy of P in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga5ac48f8e5aed0700bf6d74525ab4dc5f" title="Create a new permutation.">gdsl_perm_alloc</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#ga6b47f17955cf07b9152f140f12f95082" title="Destroy a permutation.">gdsl_perm_free</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab4feda5cbd58558d67c49244c33a4481"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_get_name" ref="gab4feda5cbd58558d67c49244c33a4481" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__gdsl__perm.html#gab4feda5cbd58558d67c49244c33a4481">gdsl_perm_get_name</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the name of a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>The returned string MUST NOT be freed. </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to get the name from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the name of the permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gaceca0436e5a36d5d18f660ac095b1c3e" title="Set the name of a permutation.">gdsl_perm_set_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gac9b83edf2f8ec8ad479586219881cc93"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_get_size" ref="gac9b83edf2f8ec8ad479586219881cc93" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__perm.html#gac9b83edf2f8ec8ad479586219881cc93">gdsl_perm_get_size</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the size of a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to get the size from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of elements of P (noted |P|). </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga6b88e7e20a9942a1da01c23d2ef8936c" title="Get the (INDIX+1)-th element from a permutation.">gdsl_perm_get_element()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gaa5e0d0afabe6d79d5ce04da174b8667b" title="Get the array elements of a permutation.">gdsl_perm_get_elements_array()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga6b88e7e20a9942a1da01c23d2ef8936c"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_get_element" ref="ga6b88e7e20a9942a1da01c23d2ef8936c" args="(const gdsl_perm_t P, const ulong INDIX)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__perm.html#ga6b88e7e20a9942a1da01c23d2ef8936c">gdsl_perm_get_element</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>&#160;</td>
          <td class="paramname"><em>INDIX</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the (INDIX+1)-th element from a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; &lt;= 0 INDIX &lt; |P| </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to use. </td></tr>
    <tr><td class="paramname">INDIX</td><td>The indix of the value to get. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the value at the INDIX-th position in the permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gac9b83edf2f8ec8ad479586219881cc93" title="Get the size of a permutation.">gdsl_perm_get_size()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gaa5e0d0afabe6d79d5ce04da174b8667b" title="Get the array elements of a permutation.">gdsl_perm_get_elements_array()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaa5e0d0afabe6d79d5ce04da174b8667b"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_get_elements_array" ref="gaa5e0d0afabe6d79d5ce04da174b8667b" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a>* <a class="el" href="group__gdsl__perm.html#gaa5e0d0afabe6d79d5ce04da174b8667b">gdsl_perm_get_elements_array</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the array elements of a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to get datas from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the values array of the permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga6b88e7e20a9942a1da01c23d2ef8936c" title="Get the (INDIX+1)-th element from a permutation.">gdsl_perm_get_element()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gab6a8108d042d230f0838e975d439656a" title="Initialize a permutation with an array of values.">gdsl_perm_set_elements_array()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga9e3960e0cbaba7b0a1821742651f26ce"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_inversions_count" ref="ga9e3960e0cbaba7b0a1821742651f26ce" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__perm.html#ga9e3960e0cbaba7b0a1821742651f26ce">gdsl_perm_linear_inversions_count</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count the inversions number into a linear permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The linear permutation to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of inversions into the linear permutation P. </dd></dl>

</div>
</div>
<a class="anchor" id="ga84ccaeabf3ffbc6143be37b3de6c53e3"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_cycles_count" ref="ga84ccaeabf3ffbc6143be37b3de6c53e3" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__perm.html#ga84ccaeabf3ffbc6143be37b3de6c53e3">gdsl_perm_linear_cycles_count</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count the cycles number into a linear permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The linear permutation to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of cycles into the linear permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga4f851d54782568685ae55b964ea94ef7" title="Count the cycles number into a canonical permutation.">gdsl_perm_canonical_cycles_count()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4f851d54782568685ae55b964ea94ef7"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_canonical_cycles_count" ref="ga4f851d54782568685ae55b964ea94ef7" args="(const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> <a class="el" href="group__gdsl__perm.html#ga4f851d54782568685ae55b964ea94ef7">gdsl_perm_canonical_cycles_count</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Count the cycles number into a canonical permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid canonical gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The canonical permutation to use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of cycles into the canonical permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga84ccaeabf3ffbc6143be37b3de6c53e3" title="Count the cycles number into a linear permutation.">gdsl_perm_linear_cycles_count()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaceca0436e5a36d5d18f660ac095b1c3e"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_set_name" ref="gaceca0436e5a36d5d18f660ac095b1c3e" args="(gdsl_perm_t P, const char *NEW_NAME)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gaceca0436e5a36d5d18f660ac095b1c3e">gdsl_perm_set_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>NEW_NAME</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the name of a permutation. </p>
<p>Change the previous name of the permutation P to a copy of NEW_NAME.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( 1 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to change the name </td></tr>
    <tr><td class="paramname">NEW_NAME</td><td>The new name of P </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified permutation in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gab4feda5cbd58558d67c49244c33a4481" title="Get the name of a permutation.">gdsl_perm_get_name()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga96c51be096313fb40d8ef6a216b5ee54"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_next" ref="ga96c51be096313fb40d8ef6a216b5ee54" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#ga96c51be096313fb40d8ef6a216b5ee54">gdsl_perm_linear_next</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the next permutation from a linear permutation. </p>
<p>The permutation P is modified to become the next permutation after P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t &amp; |P| &gt; 1 </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The linear permutation to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the next permutation after the permutation P. </dd>
<dd>
NULL if P is already the last permutation. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gaab88f0c950081d8ffa112e54bb7435fc" title="Get the previous permutation from a linear permutation.">gdsl_perm_linear_prev()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaab88f0c950081d8ffa112e54bb7435fc"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_prev" ref="gaab88f0c950081d8ffa112e54bb7435fc" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gaab88f0c950081d8ffa112e54bb7435fc">gdsl_perm_linear_prev</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the previous permutation from a linear permutation. </p>
<p>The permutation P is modified to become the previous permutation before P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid linear gdsl_perm_t &amp; |P| &gt;= 2 </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The linear permutation to modify </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the previous permutation before the permutation P. </dd>
<dd>
NULL if P is already the first permutation. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga96c51be096313fb40d8ef6a216b5ee54" title="Get the next permutation from a linear permutation.">gdsl_perm_linear_next()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gab6a8108d042d230f0838e975d439656a"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_set_elements_array" ref="gab6a8108d042d230f0838e975d439656a" args="(gdsl_perm_t P, const ulong *ARRAY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gab6a8108d042d230f0838e975d439656a">gdsl_perm_set_elements_array</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#ga9c34ac44da309b004570530c8cec8a0e">ulong</a> *&#160;</td>
          <td class="paramname"><em>ARRAY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize a permutation with an array of values. </p>
<p>Initialize the permutation P with the values contained in the array of values ARRAY. If ARRAY does not design a permutation, then P is left unchanged.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; V != NULL &amp; |V| == |P| </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to initialize </td></tr>
    <tr><td class="paramname">ARRAY</td><td>The array of values to initialize P </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the modified permutation in case of success. </dd>
<dd>
NULL in case V does not design a valid permutation. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gaa5e0d0afabe6d79d5ce04da174b8667b" title="Get the array elements of a permutation.">gdsl_perm_get_elements_array()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad38dd48e3815e438a53d119c39753ee0"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_multiply" ref="gad38dd48e3815e438a53d119c39753ee0" args="(gdsl_perm_t RESULT, const gdsl_perm_t ALPHA, const gdsl_perm_t BETA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gad38dd48e3815e438a53d119c39753ee0">gdsl_perm_multiply</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>RESULT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>ALPHA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>BETA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Multiply two permutations. </p>
<p>Compute the product of the permutations ALPHA x BETA and puts the result in RESULT without modifying ALPHA and BETA.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |RESULT| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>RESULT, ALPHA and BETA must be valids gdsl_perm_t &amp; |RESULT| == |ALPHA| == |BETA| </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">RESULT</td><td>The result of the product ALPHA x BETA </td></tr>
    <tr><td class="paramname">ALPHA</td><td>The first permutation used in the product </td></tr>
    <tr><td class="paramname">BETA</td><td>The second permutation used in the product </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>RESULT, the result of the multiplication ALPHA x BETA. </dd></dl>

</div>
</div>
<a class="anchor" id="gad015b546ff3bad397617661869a1fcfb"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_linear_to_canonical" ref="gad015b546ff3bad397617661869a1fcfb" args="(gdsl_perm_t Q, const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gad015b546ff3bad397617661869a1fcfb">gdsl_perm_linear_to_canonical</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert a linear permutation to its canonical form. </p>
<p>Convert the linear permutation P to its canonical form. The resulted canonical permutation is placed into Q without modifying P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P &amp; Q must be valids gdsl_perm_t &amp; |P| == |Q| &amp; P != Q </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">Q</td><td>The canonical form of P </td></tr>
    <tr><td class="paramname">P</td><td>The linear permutation used to compute its canonical form into Q </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the canonical form Q of the permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga648a4fc1929f159a58e3e768fa0396ae" title="Convert a canonical permutation to its linear form.">gdsl_perm_canonical_to_linear()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga648a4fc1929f159a58e3e768fa0396ae"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_canonical_to_linear" ref="ga648a4fc1929f159a58e3e768fa0396ae" args="(gdsl_perm_t Q, const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#ga648a4fc1929f159a58e3e768fa0396ae">gdsl_perm_canonical_to_linear</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert a canonical permutation to its linear form. </p>
<p>Convert the canonical permutation P to its linear form. The resulted linear permutation is placed into Q without modifying P.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P &amp; Q must be valids gdsl_perm_t &amp; |P| == |Q| &amp; P != Q </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">Q</td><td>The linear form of P </td></tr>
    <tr><td class="paramname">P</td><td>The canonical permutation used to compute its linear form into Q </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the linear form Q of the permutation P. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gad015b546ff3bad397617661869a1fcfb" title="Convert a linear permutation to its canonical form.">gdsl_perm_linear_to_canonical()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaefadbcc1a7b7182da1f54f7d10db3d2b"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_inverse" ref="gaefadbcc1a7b7182da1f54f7d10db3d2b" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gaefadbcc1a7b7182da1f54f7d10db3d2b">gdsl_perm_inverse</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Inverse in place a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to invert </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the inverse permutation of P in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga1db013c30cc84b004344fd1269614845" title="Reverse in place a permutation.">gdsl_perm_reverse()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga1db013c30cc84b004344fd1269614845"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_reverse" ref="ga1db013c30cc84b004344fd1269614845" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#ga1db013c30cc84b004344fd1269614845">gdsl_perm_reverse</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reverse in place a permutation. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| / 2 ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to reverse </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the mirror image of the permutation P </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#gaefadbcc1a7b7182da1f54f7d10db3d2b" title="Inverse in place a permutation.">gdsl_perm_inverse()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gae98151cfcded6cf6d4a66374db5c4714"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_randomize" ref="gae98151cfcded6cf6d4a66374db5c4714" args="(gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a> <a class="el" href="group__gdsl__perm.html#gae98151cfcded6cf6d4a66374db5c4714">gdsl_perm_randomize</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Randomize a permutation. </p>
<p>The permutation P is randomized in an efficient way, using inversions array.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to randomize </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the mirror image ~P of the permutation of P in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf03dc9a6539bf9dca426858db7f55b51"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_apply_on_array" ref="gaf03dc9a6539bf9dca426858db7f55b51" args="(gdsl_element_t *V, const gdsl_perm_t P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a>* <a class="el" href="group__gdsl__perm.html#gaf03dc9a6539bf9dca426858db7f55b51">gdsl_perm_apply_on_array</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gdsl__types.html#ga0e2b9d7fb5ca9e6d50100e5d9e4bcae7">gdsl_element_t</a> *&#160;</td>
          <td class="paramname"><em>V</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Apply a permutation on to a vector. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; |P| == |V| </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">V</td><td>The vector/array to reorder according to P </td></tr>
    <tr><td class="paramname">P</td><td>The permutation to use to reorder V </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the reordered array V according to the permutation P in case of success. </dd>
<dd>
NULL in case of insufficient memory. </dd></dl>

</div>
</div>
<a class="anchor" id="ga45bf1ea87129954de111428ef3d59e2e"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_write" ref="ga45bf1ea87129954de111428ef3d59e2e" args="(const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__perm.html#ga45bf1ea87129954de111428ef3d59e2e">gdsl_perm_write</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the elements of a permutation to a file. </p>
<p>Write the elements of the permuation P to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; WRITE_F != NULL &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write P's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga8502f95088d9e9bdb8b3e25495404213" title="Write the elements of a permutation to a file into XML.">gdsl_perm_write_xml()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gad09dc532469272837d7f052980519526" title="Dump the internal structure of a permutation to a file.">gdsl_perm_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga8502f95088d9e9bdb8b3e25495404213"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_write_xml" ref="ga8502f95088d9e9bdb8b3e25495404213" args="(const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__perm.html#ga8502f95088d9e9bdb8b3e25495404213">gdsl_perm_write_xml</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the elements of a permutation to a file into XML. </p>
<p>Write the elements of the permutation P to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F function to write P's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to write. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write P's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga45bf1ea87129954de111428ef3d59e2e" title="Write the elements of a permutation to a file.">gdsl_perm_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#gad09dc532469272837d7f052980519526" title="Dump the internal structure of a permutation to a file.">gdsl_perm_dump()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gad09dc532469272837d7f052980519526"></a><!-- doxytag: member="gdsl_perm.h::gdsl_perm_dump" ref="gad09dc532469272837d7f052980519526" args="(const gdsl_perm_t P, const gdsl_write_func_t WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__gdsl__perm.html#gad09dc532469272837d7f052980519526">gdsl_perm_dump</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__gdsl__perm.html#gad6fc9c69f61c5703242070522910bea8">gdsl_perm_t</a>&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gdsl__types.html#gafc7394b6c8e0a5bd92df75e24512dfd6">gdsl_write_func_t</a>&#160;</td>
          <td class="paramname"><em>WRITE_F</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>OUTPUT_FILE</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>USER_DATA</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dump the internal structure of a permutation to a file. </p>
<p>Dump the structure of the permutation P to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F function to write P's elements to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>Complexity: O( |P| ) </dd></dl>
<dl class="pre"><dt><b>Precondition:</b></dt><dd>P must be a valid gdsl_perm_t &amp; OUTPUT_FILE != NULL </dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">P</td><td>The permutation to dump. </td></tr>
    <tr><td class="paramname">WRITE_F</td><td>The write function. </td></tr>
    <tr><td class="paramname">OUTPUT_FILE</td><td>The file where to write P's elements. </td></tr>
    <tr><td class="paramname">USER_DATA</td><td>User's datas passed to WRITE_F. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__gdsl__perm.html#ga45bf1ea87129954de111428ef3d59e2e" title="Write the elements of a permutation to a file.">gdsl_perm_write()</a> </dd>
<dd>
<a class="el" href="group__gdsl__perm.html#ga8502f95088d9e9bdb8b3e25495404213" title="Write the elements of a permutation to a file into XML.">gdsl_perm_write_xml()</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Wed Jun 12 2013 18:18:47 for gdsl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
